package day_05;

/**
 * @ClassName Day05Homework_4
 * @Description TODO
 * @Author hp
 * @Date 2021/6/7 14:41
 * @Version 1.0
 **/
public class Day05Homework_4 {
    public static void main(String[] args) {
        char[] ch1 = {'a','l','f','m','f','o','b','b','s','n'};
        int[] sum = new int[26];
        for (int i = 0; i <ch1.length ; i++) {
            ;sum[(int)ch1[i]-97]++;

        }
        for (int i = 0; i <sum.length ; i++) {
            if(sum[i]!=0){
                System.out.println((char)(i+97)+"--->"+sum[i]);
            }
        }
    }
}
